﻿CREATE TABLE [dbo].[DomainUnits] (
    [DomainID]     INT NOT NULL,
    [DomainUnitID] INT IDENTITY (1, 1) NOT NULL,
    [UnitID]       INT NOT NULL,
    CONSTRAINT [PK_dbo.DomainUnits] PRIMARY KEY CLUSTERED ([DomainUnitID] ASC),
    CONSTRAINT [FK_dbo.DomainUnits_dbo.Units_UnitID] FOREIGN KEY ([UnitID]) REFERENCES [dbo].[Units] ([UnitID])
);


GO
CREATE NONCLUSTERED INDEX [IX_DomainID]
    ON [dbo].[DomainUnits]([DomainID] ASC);

